# from utils.my_celery import app
# from ronglian_sms_sdk import SmsSDK
# accId = '2c94811c853e09e0018543237cc80038'
# accToken = '1bb7b99dd0104bd78d9b286338ac57b1'
# appId = '2c94811c853e09e0018543237d8b003f'
# @app.task
import time,random,os
from utils.my_celery import app
from catch import redis_cli
from config import REDIS_MSG_CODE_KEY
def send_one_code(mobile):
    # 生成code
    code = random.randint(100000,999999)
    time.sleep(3)
    redis_cli.setex(REDIS_MSG_CODE_KEY + mobile,time=120,value=code)
    # sdk = SmsSDK(accId, accToken, appId)
    # tid = '1'
    # datas = (data, '5')
    # resp = sdk.sendMessage(tid, mobile, datas)
    # return resp